#!/usr/bin/env python3

from pylab import *

fp = open('weights_dcds.txt', 'w')

# 1MHz
# 26Mhz
#w_size = 22

#for cnt in range(w_size):
#    for os in range(16):
#        if cnt >=7 and cnt <= 9:
#            w = 1./3
#        elif cnt >=16 and cnt <= 18:
#            w = -1./3
#        else:
#            w = 0
#
#        fp.write('%12.8f '%(w)) 
#
#    fp.write('\n')

# 1Mhz
# 39MHz
# w_size = 34

# for cnt in range(w_size):
#     for os in range(16):
#         if os==8:
#             if cnt >=11 and cnt <= 14:
#                 w = 1./4
#             elif cnt >=26 and cnt <= 30:
#                 w = -1./5
#             else:
#                 w = 0
#         elif os==13:
#             if cnt >=11 and cnt <= 14:
#                 w = 1./4
#             elif cnt >=26 and cnt <= 30:
#                 w = -1./5
#             else:
#                 w = 0
#         else:
#             if cnt >=10 and cnt <= 15:
#                 w = 1./6
#             elif cnt >=26 and cnt <= 30:
#                 w = -1./5
#             else:
#                 w = 0

#         fp.write('%12.8f '%(w))

#     fp.write('\n')

w_size = 72

for cnt in range(w_size):
    for os in range(16):
        if cnt >=17 and cnt <= 32:
            w = 1./16
        elif cnt >=51 and cnt <= 65:
            w = -1./15
        else:
            w = 0

        fp.write('%12.8f '%(w)) 

    fp.write('\n')





# 200kHz
#w_size = 110

#for cnt in range(w_size):
#    for os in range(16):
#        if cnt >=10 and cnt <= 50:
#            w = 1./41
#        elif cnt >=60 and cnt <= 100:
#            w = -1./41
#        else:
#            w = 0

#        fp.write('%12.8f '%(w)) 

#    fp.write('\n')

fp.close()

